package registry;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author: mengyu
 * @Date: 2024/7/14
 */
public class LocalRegistry {
    /**
     * 注册信息存储
     */
    private static final Map<String, Class<?>> map = new ConcurrentHashMap<>();


    public static void register(String serviceName, Class<?> implClass){
        map.put(serviceName,implClass);
    }

    public static Class<?> get(String serviceName){
        return map.get(serviceName);
    }

    public static void remove(String serviceName){
        map.remove(serviceName);
    }
}
